function add_download(link, link_id){
	var request = new Ajax.Request('/downloads/add/', { method:'get',
                                parameters: {enc: "json", link: link},
                                onSuccess: function(transport){
                                        var json = transport.responseText;
                                        obj = json.evalJSON();
					var text = "";
					if (obj.result == 1){
						text = "Download added succesfully";
					}
					else{
						text = "Could not add download";
					}	
					$(link_id).update(text);
                                        }
                                });
        return false;
}
